home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / Assert.h < prev    next >
Text File  |  1991-04-17  |  546b  |  33 lines

  1. /************************************************************
  2.  
  3.     Assert.h
  4.     Diagnostics
  5.     
  6.     Copyright © Apple Computer,Inc.  1987-1990.
  7.     All Rights Reserved.
  8.  
  9. ************************************************************/
  10.  
  11. #undef assert
  12.  
  13. #ifdef NDEBUG
  14.  
  15. #define assert(ignore) ((void) 0)
  16.  
  17. #else
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. void __assertprint(const char* file, int line, const char* expr);
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26.  
  27. #define assert(expression) \
  28.     ( (expression) ? (void) 0 : (__assertprint(__FILE__, __LINE__, #expression)) )
  29.         
  30. #endif
  31.  
  32.  
  33.